﻿using System;
using System.Collections;
using System.Configuration;
using System.Data;
using System.Linq;
using System.Web;
using System.Web.Security;
using System.Web.UI;
using System.Web.UI.HtmlControls;
using System.Web.UI.WebControls;
using System.Web.UI.WebControls.WebParts;
using System.Xml.Linq;
using Microsoft.JCI.Bll;
using Microsoft.JCI.Common.Entity;
using System.Collections.Generic;

namespace Microsoft.JCI.Portal
{
    public partial class ToolStrip : BasePage
    {
        public override bool IsCheckAccessible
        {
            get
            {
                return false;
            }
        }
        protected void Page_Load(object sender, EventArgs e)
        {
            if (!IsPostBack)
            {
                //lblUserName.Text = base.CurrentUserEntity.UserName;

                SystemBll bll = new SystemBll();
                List<SysCompanyEntity> Company = bll.GetAll<SysCompanyEntity>(" and CompanyCode in (" + CurrentUserEntity.QueryFilterCompanyCode()+")");
                if (Company != null)
                {
                    foreach(SysCompanyEntity c in Company)
                    {
                    string t = c.Name + "(" + base.CurrentUserEntity.UserName + ")";
                    comps.Items.Add(new ListItem(t));
                        }
                }
            }
        }
    }
}
